/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.st.entity;

import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 调拨单Entity
 * @author HOHD
 * @version 2020-12-15
 */
@Table(name="st_allot_bill_detail", alias="a", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="bill_no", attrName="billNo", label="单据号"),
		@Column(name="material_name", attrName="materialName", label="物料名称", queryType=QueryType.LIKE),
		@Column(name="unit", attrName="unit", label="单位"),
		@Column(name="batch_number", attrName="batchNumber", label="批号"),
		@Column(name="bar_code", attrName="barCode", label="条码号"),
		@Column(name="warehouse_position", attrName="warehousePosition", label="仓位"),
		@Column(name="pack_type", attrName="packType", label="包装规格"),
		@Column(name="number", attrName="number", label="数量"),
		@Column(name="product_date", attrName="productDate", label="生产日期"),
		@Column(name="saved_type", attrName="savedType", label="保质期"),
		@Column(name="pass_date", attrName="passDate", label="到期日期"),
		@Column(name="product_maker", attrName="productMaker", label="生产厂家"),
		@Column(name="remarks", attrName="remarks", label="备注", queryType=QueryType.LIKE),
		@Column(name="parent_id", attrName="parentId.id", label="父 id"),
		@Column(name="inventory_number", attrName="inventoryNumber", label="库存数量"),
		@Column(name="allot_out_warehouse", attrName="allotOutWarehouse", label="调出仓位"),
		@Column(name="allot_in_warehouse", attrName="allotInWarehouse", label="调入仓位"),
		@Column(name="allot_number", attrName="allotNumber", label="调拨数量"),
	}, orderBy="a.id ASC"
)
public class StAllotBillDetail extends DataEntity<StAllotBillDetail> {
	
	private static final long serialVersionUID = 1L;
	private String billNo;		// 单据号
	private String materialName;		// 物料名称
	private String unit;		// 单位
	private String batchNumber;		// 批号
	private String barCode;		// 条码号
	private String warehousePosition;		// 仓位
	private String packType;		// 包装规格
	private Integer number;		// 数量
	private Date productDate;		// 生产日期
	private Integer savedType;		// 保质期
	private Date passDate;		// 到期日期
	private Integer productMaker;		// 生产厂家
	private StAllotBill parentId;		// 父 id 父类
	private Integer inventoryNumber;		// 库存数量
	private String allotOutWarehouse;		// 调出仓位
	private String allotInWarehouse;		// 调入仓位
	private Integer allotNumber;		// 调拨数量
	
	public StAllotBillDetail() {
		this(null);
	}


	public StAllotBillDetail(StAllotBill parentId){
		this.parentId = parentId;
	}
	
	@Length(min=0, max=20, message="单据号长度不能超过 20 个字符")
	public String getBillNo() {
		return billNo;
	}

	public void setBillNo(String billNo) {
		this.billNo = billNo;
	}
	
	@Length(min=0, max=36, message="物料名称长度不能超过 36 个字符")
	public String getMaterialName() {
		return materialName;
	}

	public void setMaterialName(String materialName) {
		this.materialName = materialName;
	}
	
	@Length(min=0, max=36, message="单位长度不能超过 36 个字符")
	public String getUnit() {
		return unit;
	}

	public void setUnit(String unit) {
		this.unit = unit;
	}
	
	@Length(min=0, max=20, message="批号长度不能超过 20 个字符")
	public String getBatchNumber() {
		return batchNumber;
	}

	public void setBatchNumber(String batchNumber) {
		this.batchNumber = batchNumber;
	}
	
	@Length(min=0, max=20, message="条码号长度不能超过 20 个字符")
	public String getBarCode() {
		return barCode;
	}

	public void setBarCode(String barCode) {
		this.barCode = barCode;
	}
	
	@Length(min=0, max=36, message="仓位长度不能超过 36 个字符")
	public String getWarehousePosition() {
		return warehousePosition;
	}

	public void setWarehousePosition(String warehousePosition) {
		this.warehousePosition = warehousePosition;
	}
	
	@Length(min=0, max=20, message="包装规格长度不能超过 20 个字符")
	public String getPackType() {
		return packType;
	}

	public void setPackType(String packType) {
		this.packType = packType;
	}
	
	public Integer getNumber() {
		return number;
	}

	public void setNumber(Integer number) {
		this.number = number;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getProductDate() {
		return productDate;
	}

	public void setProductDate(Date productDate) {
		this.productDate = productDate;
	}
	
	public Integer getSavedType() {
		return savedType;
	}

	public void setSavedType(Integer savedType) {
		this.savedType = savedType;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getPassDate() {
		return passDate;
	}

	public void setPassDate(Date passDate) {
		this.passDate = passDate;
	}
	
	public Integer getProductMaker() {
		return productMaker;
	}

	public void setProductMaker(Integer productMaker) {
		this.productMaker = productMaker;
	}
	
	@Length(min=0, max=36, message="父 id长度不能超过 36 个字符")
	public StAllotBill getParentId() {
		return parentId;
	}

	public void setParentId(StAllotBill parentId) {
		this.parentId = parentId;
	}
	
	public Integer getInventoryNumber() {
		return inventoryNumber;
	}

	public void setInventoryNumber(Integer inventoryNumber) {
		this.inventoryNumber = inventoryNumber;
	}
	
	@Length(min=0, max=36, message="调出仓位长度不能超过 36 个字符")
	public String getAllotOutWarehouse() {
		return allotOutWarehouse;
	}

	public void setAllotOutWarehouse(String allotOutWarehouse) {
		this.allotOutWarehouse = allotOutWarehouse;
	}
	
	@Length(min=0, max=36, message="调入仓位长度不能超过 36 个字符")
	public String getAllotInWarehouse() {
		return allotInWarehouse;
	}

	public void setAllotInWarehouse(String allotInWarehouse) {
		this.allotInWarehouse = allotInWarehouse;
	}
	
	public Integer getAllotNumber() {
		return allotNumber;
	}

	public void setAllotNumber(Integer allotNumber) {
		this.allotNumber = allotNumber;
	}
	
}